Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a --readonly flag to the usroverlay command, allowing the creation of a read-only transient overlay on /usr. The changes are well-implemented across the CLI, the two backends (ostree and composefs), documentation, and tests. The code is clear and the new functionality is tested. I have one minor suggestion to improve code conciseness.
| let args = match access_mode { | ||
| // In this context, "--transient" means "read-only overlay" | ||
| FilesystemOverlayAccessMode::ReadOnly => ["admin", "unlock", "--transient"].as_slice(), | ||
|
|
||
| FilesystemOverlayAccessMode::ReadWrite => ["admin", "unlock"].as_slice(), | ||
| }; |
There was a problem hiding this comment.
This match statement can be simplified into an if/else expression to make it more concise.
| let args = match access_mode { | |
| // In this context, "--transient" means "read-only overlay" | |
| FilesystemOverlayAccessMode::ReadOnly => ["admin", "unlock", "--transient"].as_slice(), | |
| FilesystemOverlayAccessMode::ReadWrite => ["admin", "unlock"].as_slice(), | |
| }; | |
| let args: &[&str] = if access_mode == FilesystemOverlayAccessMode::ReadOnly { | |
| // In this context, "--transient" means "read-only overlay" | |
| &["admin", "unlock", "--transient"] | |
| } else { | |
| &["admin", "unlock"] | |
| }; |
Signed-off-by: Evan Goode <mail@evangoo.de>
Signed-off-by: Evan Goode <mail@evangoo.de>
311143c to
331b8b9
Compare
|
|
||
| # SYNOPSIS | ||
|
|
||
| **bootc usr-overlay** \[*OPTIONS...*\] |
There was a problem hiding this comment.
just update-generated should resync the new options
There was a problem hiding this comment.
Done in a separate commit
| | **bootc edit** | Apply full changes to the host specification | | ||
| | **bootc status** | Display status | | ||
| | **bootc usr-overlay** | Add a transient writable overlayfs on `/usr` | | ||
| | **bootc usr-overlay** | Add a transient overlayfs on `/usr` | |
There was a problem hiding this comment.
could we have a more descriptive doc explaining the purpose of --readonly?
There was a problem hiding this comment.
I added more info under the --read-only flag, wdyt?
Signed-off-by: Evan Goode <mail@evangoo.de>
Signed-off-by: Evan Goode <mail@evangoo.de>
Signed-off-by: Evan Goode <mail@evangoo.de>
331b8b9 to
0b759cb
Compare
Resolves #2034.